<%@ page import="com.nebula.common.Const" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title><%=Const.SYSTEM_NAME%>-角色组</title>
    <jsp:include page="../header.jsp" />
    <style>
        .center {
            width: 80%;
            height: 80%;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            padding: 10px;
        }
    </style>
</head>
<body>
<div class="container-fluid p-20">
    <div class="row">
        <div class="col-xs-8">
            <table id="role-dg"></table>
        </div>
    </div>
</div>

<div id="add" style="overflow: hidden;position: relative">
    <div class="center">
        <form action="" class="form-horizontal mt-10" id="role-form">
            <div class="form-group">
                <label for="role" class="col-sm-3 control-label">角色名称</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" id="role" placeholder="角色名称">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">权限等级</label>
                <div class="col-sm-9">
                    <select class="form-control" id="roleLevel" title="">
                        <option value="2">普通用户</option>
                        <option value="1">管理员</option>
                        <option value="0">超级管理员</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="desc" class="col-sm-3 control-label">描述</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" id="desc" placeholder="描述">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-3 col-sm-9">
                    <button type="button" class="btn btn-primary" id="addRole"><i class="fa fa-floppy-o"></i>&nbsp;
                        添加</button>
                    <button type="button" class="btn btn-info" id="addRoleContinue"><i
                            class="fa fa-floppy-o"></i>&nbsp;添加并继续</button>
                </div>
            </div>
        </form>
    </div>
</div>

<div id="edit" style="overflow: hidden;position: relative">
    <div class="center">
        <form action="" class="form-horizontal mt-10" id="role-form-edit">
            <div class="form-group">
                <label for="role" class="col-sm-3 control-label">角色名称</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" id="roleEdit" placeholder="角色名称">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">权限等级</label>
                <div class="col-sm-9">
                    <select class="form-control" id="roleLevelEdit" title="">
                        <option value="2">普通用户</option>
                        <option value="1">管理员</option>
                        <option value="0">超级管理员</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="desc" class="col-sm-3 control-label">描述</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" id="descEdit" placeholder="描述">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-3 col-sm-9">
                    <button type="button" class="btn btn-primary" id="updateRole"><i class="fa fa-edit"></i>&nbsp;
                        修改
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
<jsp:include page="../footer.jsp" />
<script src="${pageContext.request.contextPath}/js/custom/role-group.js"></script>

</body>
</html>
